﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
#if DOT_NET
using Microsoft.VisualStudio.TestTools.UnitTesting;
#else
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
#endif
using StyleMVVM.DependencyInjection;
using StyleMVVM.UnitTests.TestClasses.Disposable;

namespace StyleMVVM.UnitTests.DependencyInjection
{
	[TestClass]
	public class DisposableTests : BaseTestClass
	{
		[TestMethod]
		public void DisposableContextTest()
		{

			using (IDisposableInjectionContext context = Container.CreateDisposableInjectionContext())
			{
				TestDisposable disposable = Container.LocateWithContext<TestDisposable>(context);
			}

			Assert.AreEqual(1, TestDisposable.DisposeCount);
		}
	}
}
